<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>

<script type="text/javascript" src="dwr/interface/ExaminWFApprover.js"></script>

<div id="dlgOtShow"
	style="left: 210px; top: 100px; z-index: 5; solid; width: 560px; display: none;">
	<table cellSpacing="0" cellPadding="0" width="100%" class="gridview"
		width="100%">
		<tr>
			<td width="15%" class="tablefield">
				加班单编号
			</td>
			<td width="35%" style="word-break: break-all;">
				<label id="ot-orNo"></label>
			</td>
			<td width="15%" class="tablefield">
				加班种类
			</td>
			<td width="35%">
				<label id="ot-orOtNo-otName"></label>
			</td>
		</tr>
		<tr>
			<td class="tablefield">
				员工(编号)
			</td>
			<td>
				<label id="ot-orEmpNo-empName"></label>
				(
				<label id="ot-orEmpNo-empDistinctNo"></label>
				)
			</td>
			<td class="tablefield">
				所在部门
			</td>
			<td>
				<label id="ot-orEmpDept-departmentName"></label>
			</td>
		</tr>
		<tr>
			<td class="tablefield">
				加班开始时间
			</td>
			<td>
				<label id="ot-orStartDate" lang="Date"></label>
			</td>
			<td class="tablefield">
				加班结束时间
			</td>
			<td>
				<label id="ot-orEndDate"></label>
			</td>
		</tr>
		<tr>
			<td class="tablefield">
				总小时
			</td>
			<td>
				<label id="ot-orTotalHours"></label>
				&nbsp;小时
			</td>
			<td class="tablefield">
				状态
			</td>
			<td>
				<label id="ot-orStatusMean"></label>
			</td>
		</tr>
		<tr>
			<td class="tablefield">
				创建时间
			</td>
			<td>
				<label id="ot-orCreateBy-empName"></label>
				于
				<label id="ot-orCreateTime"></label>
			</td>
			<td class="tablefield">
				最后修改时间
			</td>
			<td>
				<label id="ot-orLastChangeBy-empName"></label>
				于
				<label id="ot-orLastChangeTime"></label>
			</td>
		</tr>
		<tr>
			<td class="tablefield">
				加班理由
			</td>
			<td colspan="3">
				<label id="ot-orReason"></label>
			</td>
		</tr>
		<tr>
			<td colspan="4" class="prompt_div_bottom">
				<input class="button" type="button" value="关闭"
					onclick="hrm.common.closeDialog('dlgOtShow');" />
			</td>
		</tr>
	</table>
</div>

<script type="text/javascript" language="javascript">
	function ShowOT(otid) {
		ExaminWFApprover.getOTContext(otid, showLr_callback);//dwr调用,获取加班单内容，otid是加班单编号
		function showLr_callback(ot) {
			if (ot == null)
				return; // 异常处理，加班单不存在，或权限不足

			ot.orStartDate = ot.orStartDate.toFormatString("yyyy-MM-dd hh:mm");
			ot.orEndDate = ot.orEndDate.toFormatString("yyyy-MM-dd hh:mm");
			ot.orCreateTime = ot.orCreateTime.toHRMTimeString();
			ot.orLastChangeTime = ot.orLastChangeTime.toHRMTimeString();

			model.simple.initByObject("dlgOtShow", "ot", ot); //model方法
			$("#dlgOtShow").dialog("option", "title",
					'编号为' + ot.orNo + '的加班单详细信息');//设置title
			hrm.common.openDialog('dlgOtShow');
		}
	}
</script>